package com.gxa.modules.community.service.impl;

import com.gxa.modules.community.entity.Car;
import com.gxa.modules.community.entity.CarAU;
import com.gxa.modules.community.entity.CarType;
import com.gxa.modules.community.entity.Region;
import com.gxa.modules.community.mapper.CarManageMapper;
import com.gxa.modules.community.service.CarManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CarManageServiceImpl implements CarManageService {
    @Autowired
    private CarManageMapper carManageMapper;
    @Override
    public List<Car> queryByPage(Map<String, Object> params) {
        String carnum = (String)params.get("carnum");
        String username = (String)params.get("username");
        String serialNo = (String)params.get("serialNo");
        String communityId = (String)params.get("communityId");
        List<Car> cars=this.carManageMapper.queryByPage(username,carnum,serialNo,communityId);
        return cars;
    }


    @Override
    public void carManageAdd(CarAU carAU) {
        this.carManageMapper.carManageAdd(carAU);
    }

    @Override
    public void carManageUpdate(CarAU carAU) {
        this.carManageMapper.carManageUpdate(carAU);
    }

    @Override
    public void carManageDelete(Integer id) {
        this.carManageMapper.carManageDelete(id);
    }

    @Override
    public List<CarType> queryCarType() {
        List<CarType> carTypes=this.carManageMapper.queryCarType();
        return carTypes;
    }

    @Override
    public void carManageDeleteIds(List<Integer> ids) {
        this.carManageMapper.carManageDeleteIds(ids);
    }
}
